mesa: setting meson opt mesa-clc to 'auto' if LLVM support disabled 68/head
authorMirko Vogt <[email protected]>
Mon, 19 May 2025 21:15:01 +0000 (21:15 +0000)
committerMirko Vogt <[email protected]>
Mon, 19 May 2025 21:34:37 +0000 (21:34 +0000)
mesa-clc set to 'system' requires the system tool 'mesa-clc' which gets
built as part of the mesa/host build.

The mesa/host build however depends on LLVM and others - hence we're
trying to avoid pulling this in where possible if target configuration
allows.

meson option 'mesa-clc' allows for 3 options: enabled, system, auto.

While 'auto' sounds like it will only automagically go for either
'enabled' or 'system', it will also disable CLC support entirely, if
only drivers are enabled which don't need it (resulting in
`with_clc=false`) - which is exactly what we want.

This relies on only drivers being selectable, which don't automatically
enable CLC - if LLVM support is disabled.

libs/mesa/Makefile

index ef3477b6e276f41b1a12e125545d056392b324ee..f4f212963d76713b483fda88fbd502a431ba29d1 100644 (file)
@@ -582,7 +582,7 @@ MESON_ARGS += \
        -Dgallium-opencl=$(if $(CONFIG_MESA_USE_LLVM),standalone,disabled) \
        -Ddraw-use-llvm=$(if $(CONFIG_MESA_USE_LLVM),true,false) \
        -Dintel-clc=system \
-       -Dmesa-clc=system \
+       -Dmesa-clc=$(if $(CONFIG_MESA_USE_LLVM),system,auto) \
        -Dprecomp-compiler=system
 
 ifeq ($(BUILD_VARIANT),amd)